/**
 * Copyright (C)  Gadglet .
 *
 * This file is part of Gadglet
 *
 * Gadglet is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Gadglet is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Gadglet. If not, see <http://www.gnu.org/licenses/>.
 */

package com.gadglet.data;



import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.gadglet.params.SharingType;

/**
 * Persistence class for PersonalShareableContentItem sharing functionality
 * 
 * @see PersonalShareableContentItem 
 * @see com.gadglet.data.utils.ContentItemHelper
 * @see com.gadglet.params.SharingType
 *
 */
@PersistenceCapable
public class SharedItemReff {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
	private String id;
		
	@Persistent
	private SharingType sharingType;
	
	@Persistent
	private String sharedWithId;
	
	@Persistent	
	PersonalShareableContentItem personalShareableContentItem;
	
	
	public  SharedItemReff()
	{}
	
	public  SharedItemReff ( SharingType sharingType,String sharedWithId )
	{
		this.sharingType = sharingType;
		this.sharedWithId = sharedWithId;
	}
	
	

	public void setSharedWithId(String sharedWithId) {
			this.sharedWithId = sharedWithId;
	}

		
	public String getSharedWithId() {
		return sharedWithId;
	}

	public SharingType getSharingType() {
		return sharingType;
	}

	public void setSharingType(SharingType sharingType) {
		this.sharingType = sharingType;
	}
	
	
}
